
* Malaria and Conflict
* This script replicates the main text tables


********************************************************************************
*                                Preliminaries                                 *
********************************************************************************

clear all

set matsize 11000

* Set path:
* global dir "PATH"
* cd "$dir"


 

********************************************************************************
*                                    Table 2                                   *
********************************************************************************


***** Yearly

use "conflict_yearly.dta", clear


*** Specification 1

* Clustered SE

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area i.year ///
    mean_prec mean_temp spei mean_prec_lag1 mean_prec_lag2 mean_temp_lag1 ///
    mean_temp_lag2 spei_lag1 spei_lag2 if sample==1, ///
    absorb(cell_id) cluster(cell_id)


* Conley SE

acreg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    mean_prec mean_temp spei mean_prec_lag1 mean_prec_lag2 mean_temp_lag1 ///
    mean_temp_lag2 spei_lag1 spei_lag2 if sample==1, ///
    pfe1(year) pfe2(cell_id) ///
    dist(400) latitude(latitude) longitude(longitude) spatial


*** Specification 2

* Clustered SE

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    country_x_year_dv_* mean_prec mean_temp spei mean_prec_lag1 ///
    mean_prec_lag2 mean_temp_lag1 mean_temp_lag2 spei_lag1 spei_lag2 ///
    if sample==1, absorb(cell_id) cluster(cell_id)


* Conley SE

acreg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    mean_prec mean_temp spei mean_prec_lag1 mean_prec_lag2 mean_temp_lag1 ///
    mean_temp_lag2 spei_lag1 spei_lag2 country_x_year_dv_* if sample==1, ///
    pfe1(cell_id) dist(400) latitude(latitude) longitude(longitude) spatial


*** Specification 3

* Clustered SE

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    country_x_year_dv_* mean_prec mean_temp spei mean_prec_lag1 ///
    mean_prec_lag2 mean_temp_lag1 mean_temp_lag2 spei_lag1 spei_lag2 ///
    acled_conflict_dv_lag1 if sample==1, absorb(cell_id) cluster(cell_id)


* Conley SE

acreg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    mean_prec mean_temp spei mean_prec_lag1 mean_prec_lag2 mean_temp_lag1 ///
    mean_temp_lag2 spei_lag1 spei_lag2 country_x_year_dv_* ///
    acled_conflict_dv_lag1 if sample==1, ///
    pfe1(cell_id) dist(400) latitude(latitude) longitude(longitude) spatial



***** Monthly

use "conflict_monthly.dta", clear

* Generate numeric cell x year var for conley

gen cellyear_real = real(cellyear)


*** Specification 4

* Clustered SE

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHYEARdum* ///
    if sample==1, absorb(cell_id) cluster(cell_id)


* Conley SE

acreg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    mean_prec mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* ///
    MONTHYEARdum* if sample==1, ///
    pfe1(cell_id) dist(400) latitude(latitude) longitude(longitude) spatial


*** Specification 5

* Clustered SE

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHdum* ///
    if sample==1, absorb(cellyear) cluster(cell_id)


* Conley SE

acreg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    mean_prec mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* ///
    MONTHdum* if sample==1, pfe1(cellyear_real) ///
    dist(400) latitude(latitude) longitude(longitude) spatial

*** Specification 6

* Clustered SE

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* ///
    acled_conflict_dv_lag* MONTHdum* ///
    if sample==1, absorb(cellyear) cluster(cell_id)

* Conley SE

acreg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    mean_prec mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* ///
    acled_conflict_dv_lag* MONTHdum* if sample==1, pfe1(cellyear_real) ///
    dist(400) latitude(latitude) longitude(longitude) spatial

 